package org.example.coupon.controller;

import org.example.core.utils.R;
import org.example.coupon.service.CouponPreferentialService;
import org.example.coupon.vo.PreferentialVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 小杰_cc
 * @version 1.0
 */
@RestController
@RequestMapping("/sms/backend/preferential")
public class PreferentialBackendController {

    @Autowired
    private CouponPreferentialService couponPreferentialService;

    @PostMapping("/add")
    public R<?> addPreferential(@RequestBody PreferentialVo preferentialVo){
        couponPreferentialService.addPreferential(preferentialVo);
        return R.ok();
    }
}
